<extend name="./Application/Admin/View/Index/index.html"/>

<block name="box">

    <div class="view-product">
        <div class="info-center">
            <div class="manage-head">
                <h6 class="padding-left manage-head-con">订单管理</h6>
            </div>
            <div class="offcial-table input-table table-margin clearfix">
                <div class="tr-th clearfix">
                    <div class="th w5 text-center">用户ID</div>
                    <div class="th w15 text-center">订单号</div>
                    <div class="th w5 text-center">类型</div>
                    <div class="th w10 text-center">优惠券(元)</div>
                    <div class="th w10 text-center">积分抵扣(元)</div>
                    <div class="th w10 text-center">实付金额(元)</div>
                    <div class="th w15 text-center">创建时间</div>
                    <div class="th w10 text-center">支付状态</div>
                    <div class="th w5 text-center">发货状态</div>
                    <div class="th w15 text-center">操作</div>
                </div>
                <if condition="empty($orderList)">
                    <div class="tr non-info show border-bottom-none">
                        <span>没查询到符合条件的记录</span>
                    </div>
                <else/>
                    <foreach name="orderList" item="value">
                        <div class="tr show border-bottom-none text-center">
                            <div class="td w5">{{$value.user_id}}</div>
                            <div class="td w15">{{$value.order_id}}</div>
                            <div class="td w5">{{$value['goods_type']==0?'普通':'抢购'}}</div>
                            <!--优惠券-->
                            <div class="td w10">
                                <gt name="value.coupon_id" value="0">
                                    <foreach name="couponList" item="item">
                                        <eq name="item.id" value="$value.coupon_id">
                                            {{$item.cou_pri}}
                                        </eq>
                                    </foreach>
                                    <else/>
                                    0
                                </gt>
                            </div>
                            <!--积分-->
                            <div class="td w10">
                                <gt name="value.integral_num" value="0">
                                    {{$value["integral_num"]/100}}
                                    <else/>
                                    0
                                </gt>
                            </div>
                            <!--付的总金额-->
                            <div class="td w10">{{$value.price}}</div>
                            <div class="td w15">{{$value.create_time}}</div>
                            <div class="td w10">{{$value['is_pay']==1?"已付款":"未付款"}}</div>
                            <!--发货状态-->
                            <div class="td w5">
                                <switch name="value.is_deliver">
                                    <case value="0">未发货</case>
                                    <case value="1">已发货</case>
                                    <case value="2">已收货</case>
                                </switch>
                            </div>

                            <!--操作-->
                            <div class="td w15">
                                <eq name="value.is_pay" value="1">
                                    <eq name="value.is_deliver" value="0">
                                        <a href="{{:U('Order/send',array('order_id'=>$value['order_id']))}}" class="layui-btn layui-btn-normal">发货</a>
                                    </eq>
                                </eq>
                                <a href="{{:U('Order/detail',array('order_id'=>$value['order_id']))}}" class="layui-btn">查看详情</a>
                            </div>
                        </div>
                    </foreach>
                    <div class="tr show border-bottom-none text-center">
                        <div class="sabrosus">{{$page}}</div>
                    </div>
                </if>

            </div>
        </div>

    </div>


</block>